package com.itheima.mentalarithmeticpracticesystem;

import com.itheima.test.MathTest;

/**
 * 加法
 */
public class AddTest extends MathTest {
    public AddTest() {
    }

    public AddTest(int x, int y) {
        super(x, y);
    }

    /**
     * 计算
     * @return
     */
    public int calculate() {
        int sum = this.getX() + this.getY();
        return sum;
    }


    /**
     * 获取题目描述
     *
     * @return
     */
    public String getQuestion() {


        return this.getX()+"+"+this.getY()+"= ?";
    }

}

